package fr.syntheses.blog.Model.DAO.HQL;





	import org.hibernate.SessionFactory;
	import org.hibernate.cfg.Configuration;
	import org.hibernate.Session;

	/**
	 * @author Altenide-mov
	 *
	 */
	public class HibernateUtil {

		/**
		 * 
		 */
		private static SessionFactory sessionFactory;

		/**
		 * 
		 */
		public static void createSessionFactory() {
			sessionFactory = new Configuration().configure().buildSessionFactory();
		}

		/**
		 * @return Session
		 */
		public static Session getSession() {
			return sessionFactory.openSession();
		}
		

		
	}



